package cultu.supplier.service;
import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.core.message.Context;
import cultu.supplier.message.Supplier;
import cultu.supplier.message.SupplierCriteria;
import cultu.supplier.message.SupplierList;
import cultu.supplier.message.SupplierScenario;


/**
 * The Interface SupplierManager.
 */
@RemoteDestination(id="supplierManager",channel="my-amf")
public interface SupplierManager
{
  
  /**
   * Gets the supplier.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pKey the key
   * @return the supplier
   */
  Supplier getSupplier(final Context pContext, final SupplierScenario pScenario, final Supplier pKey);

  /**
   * Creates the supplier.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pSupplier the supplier
   * @return the supplier
   */
  Supplier createSupplier(final Context pContext, final SupplierScenario pScenario, final Supplier pSupplier);

  /**
   * Delete supplier.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pKey the key
   * @return the supplier
   */
  Supplier deleteSupplier(final Context pContext, final SupplierScenario pScenario, final Supplier pKey);

  /**
   * Update supplier.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pSupplier the supplier
   * @return the supplier
   */
  Supplier updateSupplier(final Context pContext, final SupplierScenario pScenario, final Supplier pSupplier);
  
  //batch methodes  
  /**
   * Find suppliers.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCriteria the criteria
   * @return the supplier list
   */
  SupplierList findSuppliers(final Context pContext, final SupplierScenario pScenario, final SupplierCriteria pCriteria);

  /**
   * Delete suppliers.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the supplier list
   */
  SupplierList deleteSuppliers(final Context pContext, final SupplierScenario pScenario, final SupplierList pList);

  /**
   * Creates the suppliers.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the supplier list
   */
  SupplierList createSuppliers(final Context pContext, final SupplierScenario pScenario, final SupplierList pList);

  /**
   * Update suppliers.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the supplier list
   */
  SupplierList updateSuppliers(final Context pContext, final SupplierScenario pScenario, final SupplierList pList);
}
